home *** CD-ROM | disk | FTP | other *** search
/ Experimental BBS Explossion 3 / Experimental BBS Explossion III.iso / pascal / gtmous13.zip / OPDEMO.PAS < prev    next >
Pascal/Delphi Source File  |  1993-06-28  |  4KB  |  79 lines

  1. {*********************************************************}
  2. {*                   GtMOUSE.PAS 1.00                    *}
  3. {*  Copyright (c) I.Evsikov, S.Shmakov & P.Sychov, 1993  *}
  4. {*                 All rights reserved.                  *}
  5. {*           Demo with Object Profesional 1.10           *}
  6. {*    Copyright (c) TurboPower Software 1988, 1989.      *}
  7. {*********************************************************}
  8. {$M 2000,4000, 14000}
  9. program OPDemo;
  10. uses
  11.     gtMouse,
  12.     opMouse,
  13.     opCrt;
  14. Const
  15.   Hand: ImageArray=($C0,$A0,$50,$2B,$15,$2E,$5F,$BF,$7F,$3F,$1F,$1F,$1F,$1F,$00,$00);
  16.  
  17. var
  18.  Finish       : boolean;
  19.  Button       : word;
  20.          CONST newarray : Array[1..8] of Char =
  21.                                    (^A,^B,^C,^T,'╠','═','╬','╧');
  22. begin
  23.      Finish:=false;
  24.      InitializeMouse;
  25.      if not MouseInstalled then begin
  26.           writeln('Mouse not installed');
  27.           Halt;
  28.      end;
  29.      EnableEventHandling;
  30.      clrScr;
  31.      writeln;
  32.      writeln('          ┌──────────────────────────────────────────────────────────┐');
  33.      writeln('          │GtMouse with OPMouse demo program, (c) 1993, Igor Evsikov.│');
  34.      writeln('          └──────────────────────────────────────────────────────────┘');
  35.      writeln('          ┌──────────────────────────────────────────────────────────┐');
  36.      writeln('          │          Move Cursor, Press Right & Left buttons         │');
  37.      writeln('          │                    Press Esc for Exit                    │');
  38.      writeln('          └──────────────────────────────────────────────────────────┘');
  39.      writeln('          ┌──────────────────────────────────────────────────────────┐');
  40.      writeln('          │                                                          │');
  41.      writeln('          │                                                          │');
  42.      writeln('          │                                                          │');
  43.      writeln('          │                                                          │');
  44.      writeln('          │                                                          │');
  45.      writeln('          │                                                          │');
  46.      writeln('          │                                                          │');
  47.      writeln('          │                                                          │');
  48.      writeln('          │                                                          │');
  49.      writeln('          │                                                          │');
  50.      writeln('          │                                                          │');
  51.      writeln('          └──────────────────────────────────────────────────────────┘');
  52.      writeln('          ┌──────────────────────────────────────────────────────────┐');
  53.      writeln('          │                 S l e e p i n g   H e r e                │');
  54.      writeln('          └──────────────────────────────────────────────────────────┘');
  55.      window(30, 10, 60, 20);
  56. {**********************************************************************}
  57.      InitSleepper(10,10,22,70,24);
  58.      LinkUserImageWith(UserArrow,Hand);
  59.    setNewCharacters(newarray);
  60.  
  61. {     SelectNotPressedImage(UserArrow);}
  62.      ShowMouse;                                    { display the cursor }
  63. {***********************************************************************}
  64.      repeat
  65.            if MousePressed then begin
  66.               hideMouse; { we hide the cursor }
  67.               Button:=MouseKeyWord;
  68.               if Button=MouseLft then   writeLn('Left Button Pressed');
  69.               if Button=MouseRt then writeLn('Right Button Pressed');
  70.               if Button=MouseBoth then writeLn('Both Buttons Pressed');
  71.               showMouse; { display the cursor }
  72.            end;
  73.            if keypressed then Finish:=(readKey=^[);
  74.      until Finish;
  75.      hideMouse; { we hide the cursor }
  76.      DisableEventHandling;
  77. end.
  78. 
  79.